package service

import (
    "github.com/gogf/gf/frame/g"
    "webserver/library/utils"
)

var (
    EmailService = &emailService{}
)

type emailService struct {}

func (s *emailService) Notice(subject string, body string) error {
    to := g.Cfg().GetString("email.defaultTo") // "315959139@qq.com"
    //subject := "位于TOP10区间"
    //body := "Test send to email"
    //fmt.Println("send email")
    err := utils.SendToMail(to, subject, body, "html")
    return err
}
